<div class="row">
  <div class="span3 bs-docs-sidebar "> <*include file="<*$controller*>/location.tpl"*> </div>
  <div class="span9">
    <h2><*if $type=='class'*>班级<*else*>家长<*/if*></h2>
    <script language="javascript" type="text/javascript">
function sendit(pushid){
	if(pushid=='' || pushid==0){
		alert('error');
		return false;
	}
	$('#botton'+pushid).disabled=true;
	$('#ajaxload').css('display','block');
  	var sendit =$.post("/<*$controller*>/sent",{pushid:pushid, type:"<*$type*>"} ,
	   function(data){
			$('#ajaxload').css('display','none'); 
			if(data==1){
				top.location.reload();
			}else
		 		alert(data);
	   }, "text");
   return true;
}
</script> 
<div id="ajaxload" class="text-center" style="display:none"><img src="/images/ajax_loader.gif"></div>
    <*$page*>
    <table class="table">
      <tr>
        <th>UID </th>
        <th>token</th>
        <th>type</th>
        <th>加入时间</th>
        <th>计划时间</th>
        <th><*if $issend==0*>发送<*else*>&nbsp;<*/if*></th>
        <th>&nbsp;</th>
      </tr>
      <*if $result*>
      <*foreach from=$result item=item key=key*>
      <tr>
        <td><*$item.uid*></td>
        <td><*$item.token*></td>
        <td><*$item.contenttype*></td>
        <td><*$item.addtime|date_format:'%Y-%m-%d %H:%I:%S'*></td>
        <td><*$item.wantsenttime|date_format:'%Y-%m-%d %H:%I:%S'*></td>
        <td><*if $issend==0*>
          <button type="button" class="btn  btn-small" onclick="sendit(<*$item.pushid*>)" id="button<*$item.pushid*>"><i class="icon-plane"></i> 发送</button>
          <*else*>&nbsp;<*/if*></td>
        <th>&nbsp;</th>
      </tr>
      <*/foreach*> 
      <*else*>
      <tr>
        <td colspan="6"> 没有数据！ </td>
      </tr>
      <*/if*>
    </table>
    <*$page*> </div>
</div>
